<?php
require_once('functions.php');

/*  DEVELOPMENT LOCKOUT */
//if (!is_dev()) header('Location: http://www.gwstudentassociation.com');

$whitelist = array(	'index.php',
					'login.php',
					'month.php',
					'year.php',
					'day.php',
					'week.php',
					'event.php',
					'refresh.php');

if (!in_array(current_page(),$whitelist)) {
	$userID = $_SESSION['UserID']; //Grab the cookies
	$password = $_SESSION['Password'];
	
	if (!match_pass($userID, $password)) {
			header('location: /calendar/login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));
			exit();
	}
} 
?>
